1. Technical Field
The present invention relates to a memory controller for controlling a non-volatile memory, and a non-volatile storage device such as a semiconductor memory card including the non-volatile memory and the memory controller.
2. Related Art
In recent years, a demand for a non-volatile storage device including a rewritable non-volatile memory is increasing, centering on a semiconductor memory card.
The semiconductor memory card has various features such as being small and light weight, having large capacity and resistance to quake, and being easy and convenient to handle, and hence the demand for such a semiconductor memory card is increasing as a recording medium of a portable device such as a digital still camera or a portable telephone. Recently, a slot for the semiconductor memory card is provided as a standard not only in the portable device but also in a stationary device such as a digital television and a DVD recorder, and thus the demand for the semiconductor memory card is further increasing.
The semiconductor memory card described above includes a flash memory (mainly NAND flash memory) serving as a non-volatile main storage memory, and a memory controller for controlling the same. The memory controller carries out read/write control of data with respect to the flash memory in accordance with a read/write command of data from an access device represented by a digital still camera main body, or the like.
The writing of data from the memory controller to the flash memory is carried out in units called a page. The main stream in a recent flash memory is a page size of about 4 kB (kilobyte) or 8 kB.
The flash memory includes a number of memory elements called cells, and stores information by accumulating charges in each cell or discharging charges from each cell. However, the information stored in the cell may get lost due to degradation of the cell or the like. The memory controller thus generally generates an error correcting code with respect to write data from the access device, and stores the same in the flash memory with the write data. Thus, even if an error occurs during the reading of the data, correction can be made if the number of error bits is within a correction capability of the error correcting code to be applied, so that correct data can be read. For example, Japanese Patent Publication No. 2005-292925 proposes a method of alternately storing the write data (user data) and the error correcting code (additional data) in a page of the flash memory.
In the method described above, however, correct data cannot be read if an error beyond the correction capability of the error correcting code occurs during the reading of the data.